<?php
	$keys = array_keys($_POST);
	$del_ids = array();
	foreach ($keys as $ids){
		if (strstr($ids, "item")){
			$del_ids[] = $ids;
		}
	}
	$restricted = 0;
	$error = 0;
	foreach ($del_ids as $del_me){
		if (!is_restricted($_POST[$del_me])){
			if (is_file($_POST[$del_me])){
				if (!unlink($_POST[$del_me])){
					$error++;
				}
			} else {
				if (rec_rmdir($_POST[$del_me]) != 0){
					$error++;
				}
			}
		} else {
			$restricted++;
		}
	}
	if ($restricted != 0 OR $error != 0){
		oyster_log("ERROR", sprintf((string)$language->errors->value_16,$restricted,$error), "Oyster delete.massive");
		$head->_template_assign("ERROR", sprintf((string)$language->errors->value_16,$restricted,$error));
	} else {
		$head->_template_assign("STATUS", $language->stati->value_6);
	}
	if (ALLOW_EASY_MOVE == true){
		build_foldersDB();
	}
	$ordner = $_GET["dir"];
	$included = true;
	include("System/Kernel/Includes/index.include.php");
?>